<template>
	<!-- 设置  -->
	<view class="setup">

		<!-- 金刚区 -->
		<view class="setup_box" v-for="(item,keyset) in setup_box" :key="keyset" @click="qq(keyset)">
			<!-- @click="goDetail(key)" -->
			<view class="setup_title">{{item.title}}</view>
			<!-- 右箭头跳转 -->
			<view class="setup_image">
				{{item.variable}}
				<image :src="item.image" mode=""></image>
			</view>
		</view><!-- </setup_box> -->

		<view class="signout">
			<!-- 退出登录 -->
			<u-modal v-model="show" :title-style="{color: 'black'}" :show-confirm-button="q" :show-cancel-button='qqq'
				confirm-color="red">
				<rich-text :nodes="content" class="rich"></rich-text>
			</u-modal>
			<u-button @click="open" class="tuichu">
				退出登录
			</u-button>
		</view><!-- sign out退出登录 -->

	</view><!-- set up设置 -->
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				content: '确定退出',
				qqq: true,
				q: true,
				setup_box: [{
						path: "../order",
						title: "意见反馈",
						image: "/static/images/yjt.png"
					},
					{
						path: "../../index/index",
						title: "修改登录密码",
						image: "/static/images/yjt.png"
					},
					{
						path: "../../index/index",
						title: "修改支付密码",
						image: "/static/images/yjt.png"
					},
					{
						path: "../../index/index",
						title: "占用缓存",
						image: "/static/images/yjt.png",
						variable: "29Kb"
					},
					{
						path: "../../index/index",
						title: "关于我们",
						image: "/static/images/yjt.png"
					},
					{
						path: "../../index/index",
						title: "隐私协议",
						image: "/static/images/yjt.png"
					}
				]

			}
		},
		onLoad() {

		},
		methods: {
			open() {
				this.show = true;
			},

			qq(e){
				console.log(e)
				if(e==0){
					uni.navigateTo({
						url:'./help'
					})
				}else if(e==1){
					uni.navigateTo({
						url:'./invite'
					})
				}
			},
			three() {
				//        
				uni.switchTab({
					url: 'cart'
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.setup {
		text-indent: 20rpx;
		line-height: 90rpx;
		// border:1px solid red;
		background-color: #F6F6F6;
		height: 100vh;

		.setup_box {
			border: 2rpx solid #F3F3F3;
			border-right: 0rpx;
			border-left: 0rpx;
			display: flex;
			justify-content: space-between;
			background-color: #FFFFFF;
			overflow: hidden;

			image {
				width: 40rpx;
				height: 40rpx;
				vertical-align: middle;
				margin-right: 20rpx;
				margin-left: 20rpx;

			}

			.setup_image {
				color: #A0A0A0;
			}

			.setup_title {
				vertical-align: middle;
				// float: left;
			}
		}

		.rich {
			text-align: center;
		}

		.tuichu {
			margin-top: 60rpx;
			width: 50%;
			color: red;
			border-radius: 50rpx;
		}
	}
</style>
